package com.example.bean;

public class Student {
    private Integer sid;
    private String sname;
    private Integer age;

    // 必须有无参构造方法
    public Student() {}

    // getter和setter
    public Integer getSid() { return sid; }
    public void setSid(Integer sid) { this.sid = sid; }

    public String getSname() { return sname; }
    public void setSname(String sname) { this.sname = sname; }

    public Integer getAge() { return age; }
    public void setAge(Integer age) { this.age = age; }

    // 重写toString
    @Override
    public String toString() {
        return "Student{sid=" + sid + ", sname='" + sname + "', age=" + age + "}";
    }
}
